package com.gethb.prod.controller;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@ComponentScan("com.gethb")
@MapperScan("com.gethb.data.dao")
@RestController
public class DemoApplication {

//	private static final Logger LOG = LoggerFactory.getLogger(DemoApplication.class);
	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}
	
//	@GetMapping("/hello")
//	public String hello(@RequestParam(value = "name", defaultValue = "World") String name) {
//		LOG.info("hello---->");
//		downloadData("btcusdt");
//		downloadData("ethbtc");
//
//		return String.format("Hello %s!", name);
//	}
//
//	private void downloadData(String symbol) {
//		List<KlinesDo> list = KLineDataUtils.requestList(symbol, "1min", 2000);
//		HashMap<Long,KlinesDo> map = KLineDataUtils.cacheMap.getOrDefault(symbol, new HashMap());
//		for (KlinesDo data : list) {
//			map.put(data.getId(), data);
//		}
//		KLineDataUtils.cacheMap.put(symbol, map);
//	}




}
